<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib prefix="mvc" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="fmt" uri="http://www.springframework.org/tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>




<!DOCTYPE html>
<!--[if IE 6 ]> <html class="ie6 lte_ie6 lte_ie7 lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 6 ]> <html class="lte_ie6 lte_ie7 lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 7 ]> <html class="lte_ie7 lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 8 ]> <html class="lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 9 ]> <html class="lte_ie9"> <![endif]-->
<!--[if (gte IE 10)|!(IE)]><!--><html><!--<![endif]-->
<head>
    <title>证照详细信息</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=10,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" type="text/css" href="/css/style.css" />
    <script type="text/javascript" src="/js/jquery/jquery-1.9.1.js"></script>
    <script src="/js/news/page.js"></script>
    <script src="/lib/laydate/laydate.js"></script>
    <script src="/js/base/base.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/pagination/js/jquery.pagination.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/js/attachment/attachView.js" type="text/javascript" charset="utf-8"></script>
    <link rel="stylesheet" type="text/css" href="/css/news/new_news.css"/>

    <script type="text/javascript" >
        var MYOA_JS_SERVER = "";
        var MYOA_STATIC_SERVER = "";
    </script>
    <style>

        #rs {
            display: inline-block;
            float: left;
            width: 78px;
            height: 38px;
            line-height: 35px;
            /*  margin-right: 30px;*/
            margin-top: 20px;
            margin-bottom: 20px;
            cursor: pointer;
            border-radius: 3px;
            background: url(../../img/newReturn.png) no-repeat;
            padding-left: 19px;
            font-size: 14px;
            margin-left: 50%;

        }

        .big3 {
            font-size: 12pt;
            COLOR: #124164;
            FONT-WEIGHT: bold;
            margin-left: 7px;
            vertical-align: top;
            display: inline-block;
            height: 20px;
            line-height: 16px;
        }
    </style>


</head>


<%--<script type="text/javascript" src="/inc/js_lang.php"></script>--%>
<%--<script type="text/javascript" src="/static/js/attach.js"></script>--%>

<body class="bodycolor">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
    <tr>
        <td class="Big"><img src="../../img/contractinfo.png" width="18" height="17"><span class="big3">证照详细信息</span><br>
        </td>
    </tr>
</table>
<br>
<table class="TableBlock" width="90%" align="center">
    <tr>
        <td nowrap align="left" width="120" class="TableContent">姓名：</td>
        <td nowrap align="left" class="TableData staffName" width="180"></td>
        <td nowrap align="left" width="120" class="TableContent">证件类型：</td>
        <td nowrap align="left" class="TableData licenseType" width="180"></td>
    </tr>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">证件编号：</td>
        <td nowrap align="left" class="TableData licenseNo" width="180"></td>
        <td nowrap align="left" width="120" class="TableContent">证件名称：</td>
        <td nowrap align="left" class="TableData licenseName" width="180"></td>
    </tr>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">取证日期：</td>
        <td nowrap align="left" class="TableData getLicenseDate" width="180"></td>
        <td nowrap align="left" width="120" class="TableContent">生效日期：</td>
        <td nowrap align="left" class="TableData effectiveDate" width="180"></td>
    </tr>

    <tr>
        <td nowrap align="left" width="120" class="TableContent">限制期限：</td>
        <td align="left" colspan="3" class="TableData expirationPeriod" width="180"></td>
    </tr>
    <%--<tr>--%>
        <%--<td nowrap align="left" width="120" class="TableContent">到期日期：</td>--%>
        <%--<td align="left" colspan="3" class="TableData expireDate" width="180"></td>--%>
    <%--</tr>--%>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">发证机构：</td>
        <td align="left" colspan="3" class="TableData notifiedBody" width="180"></td>
    </tr>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">状态：</td>
        <td align="left" colspan="3" class="TableData status" width="180"></td>
    </tr>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">登记时间：</td>
        <td align="left" colspan="3" class="TableData addTime" width="180"></td>
    </tr>

    <tr>
        <td nowrap align="left" width="120" class="TableContent">最后修改时间：</td>
        <td align="left" colspan="3" class="TableData lastUpdateTime" width="180"></td>
    </tr>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">备注：</td>
        <td align="left" colspan="3" class="TableData remark" width="180"></td>
    </tr>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">附件：</td>
        <td colspan="4" nowrap align="left" class="TableData fujian" width="180"></td>
    </tr>




    <tr align="center" class="TableControl">
        <td colspan="4">
            <%--<input type="button" value="关闭" class="BigButton" onClick="window.close();" title="关闭窗口">--%>
            <div id="rs" type="save" class="btn_return"><fmt:message code="notice.th.return" /></div>
        </td>
    </tr>
</table>
</body>
<script>
    $(function(){
        var id=$.getQueryString('licenseId');
        $('#rs').click(function(){
            window.close();
        })
        $.ajax({
            url: "/hr/manage/selectHrphotos",
            type: "get",
            data: {
                'licenseId': id
            },
            dataType: 'json',
            success: function (obj) {
                var data=obj.obj[0];
                console.log(data);
               var arr = data.attachmentList;
                var str1=""
                if (arr != '') {
                    attachView(arr,$('.fujian'),'1','0','1','0')
                };
              if(data.staffName){
                $('.staffName').html(data.staffName);/*姓名*/
              }else {
                   var ll = '(<span style="color: red;">用户已删除</span>)'
                   $('.staffName').html(ll);/*姓名*/
                }
                $('.staffName').html(data.staffName);
                $('.licenseType').html(NO(data.licenseType));
                function NO (d) {
                    switch (d) {
                        case '1':
                            return '驾驶证'
                            break;
                        case '2':
                            return '健康证'
                            break;
                        case '3':
                            return '暂住证'
                            break;
                        case '4':
                            return '技能证'
                            break;
                        case '5':
                            return '其他'
                            break;
                        default:
                            return '不存在'

                    }
                }
                $('.licenseNo').html(data.licenseNo);
                $('.licenseName').html(data.licenseName);
                $('.getLicenseDate').html(data.getLicenseDate);
                $('.effectiveDate').html(data.effectiveDate);
                $('.expirationPeriod').html(data.expirationPeriod);
                $('.notifiedBody').html(data.notifiedBody);
                $('.status').html(DO(data.status));
                function DO (d) {
                    switch (d) {
                        case '1':
                            return '未生效'
                            break;
                        case '2':
                            return '生效中'
                            break;
                        case '3':
                            return '已到期'
                            break;
                        default:
                            return '未填写'

                    }
                }
                $('.addTime').html(data.addTime);
                $('.lastUpdateTime').html(data.lastUpdateTime);
                $('.remark').html(data.remark);

            }
        })
    })
</script>
</html>


